package com.framework.core.mybatis.em;

/**
 *  目前只支持两种类型
 *  created by zzg
 *  2024-12-06
 */
public enum DbType {
    MYSQL("mysql"), POSTGRESQL("postgresql");

    private String value;

    DbType(String type) {
        this.value = type;
    }

    public static DbType parse(String type) {
        for (DbType it : DbType.values()) {
            if (it.getValue().equals(type)) {
                return it;
            }
        }
        return DbType.MYSQL;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
